<?php
	
	session_start();

	require_once("CreateUser/createUserController.php");	
	require_once("Login/loginController.php");
	require_once("pageView.php");
	require_once("Database/databaseHandler.php");
	require_once("Database/databaseSettings.php");
	
	
	class MasterController
	{
		public static function DoControll()
		{
			$database = new DatabaseHandler();
			$database->Connect(new DatabaseSettings());
			
			$loginController = new LoginController();
			$createUserController = new CreateUserController();
			
			$title = "Lab 3 - ";
			
			$result = $loginController->DoControll($database);
			
			$result .= $createUserController->DoControll($database);
			
			$database->Close();
			
			$pageView = new PageView();
			return $pageView->GetHTMLPage($title, $result);
		}
	}
	
	echo MasterController::DoControll();
?>